Double casts. 🔼

Two cast operations in a row works in SL, but not in OS.


reported=2019-06-12 23:26:38

reporter=onefang

priority=high

category=Bug

severity=major

resolution=suspended


2019-06-13 15:58:37 onefang: [url=http://wiki.secondlife.com/wiki/Vector]An example of triple casting, [/url]though it uses parenthesis to control order.


2019-06-13 18:30:22 onefang: Examples from OpenCollar (The SL version)

src/collar/oc_bell.lsl

[code=LSL]

float g_fVolume=0.5; // volume of the bell

sPrompt += "Bell Volume:  \t"+(string)((integer)(g_fVolume*10))+"/10\n"; 

[/code]

src/collar/oc_bookmarks.lsl

[code=LSL]

integer isInteger(string input) { //for validating location scheme

return ((string)((integer)input) == input);

}

[/code]

src/collar/oc_couples.lsl

[code=LSL]

string sMessage = llList2String(lMenuParams, 1);



if (sMessage == UPMENU) CoupleAnimMenu(kAv, iAuth);

else if ((integer)sMessage > 0 && ((string)((integer)sMessage) == sMessage)) {

    g_fTimeOut = (float)((integer)sMessage);

[/code]


2019-06-17 04:06:41 onefang: In current SL, and in OpenSim 0.8 and 0.9 this form is valid -

[code=LSL]

(string)((integer)1.2)

[/code]

This form isn't -

[code=LSL]

(string)(integer)1.2

[/code]

I am almost certain I have had to fix that second form in scripts that worked before but not in newer versions of OpenSim.  Let's see if I can find those again, and try the first form in them.


2019-07-23 15:12:17 onefang: I'll suspend this one until I find an example out in the wild of double cast without extra parens.